package main

import (
	"bytes"
	"embed"
	"fmt"
	"html/template"
	"log"
)

type PrometheusAlertTemplate struct {
	Replica    string
	RegionCode string
	ZoneCode   string
}

//go:embed templates/*.yaml
var templates embed.FS

func main() {
	tmpl, err := template.ParseFS(templates, "templates/omc-prometheus-alert.yaml")
	if err != nil {
		log.Fatal(err)
	} else {
		data := PrometheusAlertTemplate{
			Replica:    "test",
			RegionCode: "test",
		}
		var buf bytes.Buffer
		if err = tmpl.Execute(&buf, data); err != nil {
			log.Fatal(err)
		}
		fmt.Println(buf.String())
	}
}
